Skip to main content

Creating Indirect Collections

Overview

To maximize the use of the My Stuff menu, you can present stakeholders with different data sets derived from either direct collections in the data model or indirect collections, as described in My Stuff.

While direct collections are more common and easier to use, indirect collections offer greater flexibility by targeting collections accessible more than one entity away without needing to be predefined in the data model. Indirect collections also allow you to include design-time filters to display only items matching specific criteria.

Indirect_3


Concepts

Before you begin, consider the following scenarios for using an indirect collection:

  • Collection of data not directly bound to the stakeholder
    Examples include a collection of a collection, a collection of a related attribute, or a related attribute of a collection.

  • Reversed one-to-many relationship

Examples

1. Collection of a Collection

A collection of a collection occurs when the stakeholder has a collection of Entity A, which in turn has a collection of Entity B.

Indirect_1

When defined, this indirect collection in the My Stuff section represents the following relationship:

Indirect_4


2. Reversed One-to-Many Collection

A reversed one-to-many collection occurs when Entity A has a related attribute relationship to the stakeholder.

Indirect_2

In this scenario, the Related Stakeholder reference is defined as follows:

Indirect_15

When defined, this indirect collection in the My Stuff section represents the following relationship:

Indirect_5


Note

You may also define a permanently reversed one-to-many collection by editing your data model. This collection type can be reused in expressions and forms beyond just My Stuff.
For more information, refer to Relationships and Reversing a Related Attribute.


Creating Indirect Collections

To define the XPath of an indirect collection:

  1. Go into the Expert View and click Entities.
  2. Locate the Stakeholder entity and access its Collections item.

Custom_filter_2

  1. Select New Indirect Collection by right-clicking the Collections node or using the ribbon.

Indirect_6

  1. Set a Name and a Display Name for the new collection. The Display Name will appear in the Work Portal.

Indirect_7

  1. Navigate through the relationships in the displayed window.
    • The starting point is the current stakeholder (highlighted in blue).
    • Relationships of the green-highlighted entity are displayed in the right frame.

Indirect_8

  1. Continue navigating until you reach the desired entity.
    Example: A Patient has multiple Appointments, and each Appointment is associated with one Medical Center.

Indirect_9

  1. If a collection is part of the path, apply a filter by hovering over it and selecting Add Filter.

Indirect_10

  • A window will prompt you to define a boolean filter. Configure it and click OK.
  • You can apply multiple filters as long as they return boolean values.

Indirect_11

  1. Filtered collections display a funnel icon and the number of filters applied. Hovering over the icon shows the filters.

Indirect_12

  1. Decide whether to allow repeated records by checking/unchecking the appropriate option.

Indirect_13

  1. Click Finish to save the new indirect collection.

Example

In this example, we defined an indirect collection that allows a Patient to view records of all medical centers they are associated with when an appointment has been rescheduled.

Indirect_14


Notes

  • Indirect collections will not display the Filters or Order By options in the Work Portal when accessed by stakeholders in My Stuff.
    Filters are defined at design time but cannot be modified at runtime.